package com.thomasmoerman.dci3.domain

import com.thomasmoerman.dci3.frw.{Entity => SEntity}
import javax.persistence._

@Entity
class Person extends SEntity {
  
  def this(firstName: String = null, lastName: String = null) {
	this()
	
	this.firstName = firstName
	this.lastName = lastName
  }
	
  @Basic var firstName: String = _
  
  @Basic var lastName: String = _
  
  @OneToOne(mappedBy = "owner") var account: Account = _
  
  def name = firstName + " " + lastName
  
}